﻿using System;
using SystemX.Infrastructure;

namespace SystemX.Services
{
    /// <summary>
    /// A factory class provide kinds of singleton services resolved via the Common Service Locator (CSL)
    /// </summary>
    public static class ServiceFactory
    {
        /// <summary>
        /// A service provides dependency properties build up!.
        /// </summary>
        public static IBuildup BuildupService {
            get
            {
                var obj =ServiceLocatorX<IBuildup>.GetService();
                Check.Require(null != obj, "Can't get the service 'IBuildup' from the Common Service Locator");
                return obj;
            }
        }
    }
}
